package com.woniu.zsd.common.web;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;

import java.util.List;

@Data
public class PageInfo {
    private Long current;
    private Long size;
    private Long total;
    private Long pages;
    private List<?> list;

    public PageInfo() {};
    public PageInfo(Page<?> page){
        this.current = page.getCurrent();
        this.size = page.getSize();
        this.total = page.getTotal();
        this.pages = page.getPages();
        this.list = page.getRecords();
    }
}
